export default (editor) => {
  const config = [
    {
      type: 'addButton',
      name: 'specialTale',
      config: {
        text: '特殊表格',
        tooltip: '特殊表格',
        onAction: () => {
          console.log(editor)
          // cols, rows, border, cellspacing, cellpadding
          editor.editorCommands.commands.exec.mceinserttable(2, 3, 1, 0, 0)
        }
      }
    }
  ]

  config.forEach((v) => {
    editor.ui.registry[v.type](v.name, v.config)
  })
}
